package com.fjec.activity.mapper;

import com.fjec.activity.entity.BizActivitySeckill;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fjec.activity.entity.BizActivitySeckillCondition;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 004.发布秒杀活动表 Mapper 接口
 * </p>
 *
 * @author admin
 * @since 2020-09-18
 */
public interface BizActivitySeckillMapper extends BaseMapper<BizActivitySeckill> {

    @Select("select sc.* from biz_activity_seckill_condition sc inner join biz_activity_seckill s on sc.Id = s.Id where s.BusiId = #{busiId} order by s.CreateTime desc")
    List<BizActivitySeckillCondition> getMySeckillCondition(@Param("busiId") Long busiId);
}
